require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 3,["5"] = 3,["6"] = 5,["7"] = 5,["8"] = 7,["9"] = 7,["10"] = 7,["11"] = 7,["12"] = 9,["13"] = 9,["14"] = 9,["16"] = 9,["17"] = 9,["19"] = 9,["20"] = 9,["22"] = 10,["23"] = 7,["24"] = 12,["25"] = 7,["27"] = 13,["30"] = 7,["32"] = 15,["35"] = 9,["41"] = 20,["43"] = 23,["44"] = 24,["49"] = 27,["50"] = 28,["51"] = 27,["52"] = 32,["53"] = 32,["54"] = 32,["55"] = 32,["58"] = 35,["59"] = 35,["60"] = 35,["62"] = 35,["64"] = 32,["65"] = 34,["66"] = 38,["67"] = 38,["68"] = 38,["70"] = 38,["71"] = 38,["73"] = 38,["74"] = 38,["76"] = 39,["77"] = 39,["78"] = 39,["79"] = 39,["80"] = 39,["81"] = 39,["82"] = 39,["83"] = 39,["84"] = 38,["85"] = 42,["86"] = 43,["87"] = 42,["88"] = 46,["89"] = 47,["90"] = 46,["91"] = 50,["92"] = 51,["93"] = 50,["94"] = 54,["95"] = 55,["96"] = 54,["97"] = 58,["98"] = 59,["99"] = 58});
local ____exports = {}
local ____handle = require("solar.w3ts.handles.handle")
local Handle = ____handle.Handle
local ____DataBase = require("solar.common.DataBase")
local DataBase = ____DataBase.default
____exports.DialogButton = __TS__Class()
local DialogButton = ____exports.DialogButton
DialogButton.name = "DialogButton"
__TS__ClassExtends(DialogButton, Handle)
function DialogButton.prototype.____constructor(self, whichDialog, text, hotkey, quit, score)
    if hotkey == nil then
        hotkey = 0
    end
    if quit == nil then
        quit = false
    end
    if score == nil then
        score = false
    end
    if Handle:initFromHandle() then
        Handle.prototype.____constructor(self)
    elseif not quit then
        Handle.prototype.____constructor(
            self,
            DialogAddButton(whichDialog.handle, text, hotkey)
        )
    else
        Handle.prototype.____constructor(
            self,
            DialogAddQuitButton(whichDialog.handle, score, text, hotkey)
        )
    end
end
__TS__SetDescriptor(
    DialogButton.prototype,
    "solarData",
    {
        get = function(self)
            return DataBase:getData("DialogButton", self.handle)
        end,
        set = function(self, obj)
            DataBase:setData("DialogButton", self.handle, obj)
        end
    },
    true
)
function DialogButton.fromHandle(self, handle)
    return self:getObject(handle)
end
____exports.Dialog = __TS__Class()
local Dialog = ____exports.Dialog
Dialog.name = "Dialog"
__TS__ClassExtends(Dialog, Handle)
function Dialog.prototype.____constructor(self)
    local ____self_1 = self
    local ____Handle_initFromHandle_result_0
    if Handle:initFromHandle() then
        ____Handle_initFromHandle_result_0 = nil
    else
        ____Handle_initFromHandle_result_0 = DialogCreate()
    end
    Handle.prototype.____constructor(____self_1, ____Handle_initFromHandle_result_0)
end
function Dialog.prototype.addButton(self, text, hotkey, quit, score)
    if hotkey == nil then
        hotkey = 0
    end
    if quit == nil then
        quit = false
    end
    if score == nil then
        score = false
    end
    return __TS__New(
        ____exports.DialogButton,
        self,
        text,
        hotkey,
        quit,
        score
    )
end
function Dialog.prototype.clear(self)
    DialogClear(self.handle)
end
function Dialog.prototype.destroy(self)
    DialogDestroy(self.handle)
end
function Dialog.prototype.display(self, whichPlayer, flag)
    DialogDisplay(whichPlayer.handle, self.handle, flag)
end
function Dialog.prototype.setMessage(self, whichMessage)
    DialogSetMessage(self.handle, whichMessage)
end
function Dialog.fromHandle(self, handle)
    return self:getObject(handle)
end
return ____exports
